
public class PrimVertexData {
	/*
	 * Fields
	 * 
	 * label = name of the nearest tree vertex (infinite if not adjacent to any of the tree vertices)
	 * weight = distance to the tree vertices (NULL if vertice is not adjacent to any of the tree vertices)
	 * known = if it's in the known vertices (maybe... we might avoid using this some how)
	 * node = reference to the actual vertex. This holds the information about the vertex (i.e. incident edges)
	 */
	
	private String name;
	private String label;
	private double weight;
	private boolean known;
	private Vertex vertex; 
	
	public PrimVertexData(String name, Vertex vertex) {
		this.name = name;
		this.label = null;
		this.weight = Integer.MAX_VALUE;
		this.known = false;
		this.vertex = vertex;
		
	}
	public PrimVertexData(String name, String label, double weight, Vertex vertex) {
		this.name = name;
		this.label = label;
		this.weight = weight;
		this.vertex = vertex;
		this.known = true;
	}
	
	public void setLabel(String label) {
		this.label = label;
	}
	
	public void setWeight(double weight) {
		this.weight = weight;
	}
	
	public void setVertex(Vertex vertex) {
		this.vertex = vertex;
	}
	
	public void setKnown() {
		this.known = true;
	}
	
	public String getLabel() {
		return this.label;
	}
	
	public double getWeight() {
		return this.weight;
	}
	
	public boolean isKnown() {
		return this.known;
	}
	
	public Vertex getVertex() {
		return this.vertex;
	}
	
	public String toString() {
		StringBuffer s = new StringBuffer();
		s.append("Name = ");
		s.append(name);
		s.append(", Label = ");
		s.append(label);
		s.append(", Weight = ");
		s.append(weight);
		s.append(", Known = ");
		s.append(known);
		s.append("\n");
		return s.toString();
	}
}
